package com.gene.mapper;

import com.gene.pojo.TbOrder;
import com.gene.pojo.TbOrderExample;
import java.util.List;

import com.gene.pojo.entity.Order;
import org.apache.ibatis.annotations.Param;

public interface TbOrderMapper {

    List<Order> query(@Param("orderId") String orderId, @Param("userId") Long userId);

    /**
     * 根据userId 、status查询出所有待付款订单 status=(1、待付款；2、待发货；3、待收货；4、已完成)
     *
     */
    List<Order> await(@Param("userId") Long userId,@Param("status") Integer status);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_order
     *
     * @mbggenerated Wed Jan 10 09:44:34 CST 2018
     */
    int countByExample(TbOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_order
     *
     * @mbggenerated Wed Jan 10 09:44:34 CST 2018
     */
    int deleteByExample(TbOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_order
     *
     * @mbggenerated Wed Jan 10 09:44:34 CST 2018
     */
    int deleteByPrimaryKey(String orderId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_order
     *
     * @mbggenerated Wed Jan 10 09:44:34 CST 2018
     */
    int insert(TbOrder record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_order
     *
     * @mbggenerated Wed Jan 10 09:44:34 CST 2018
     */
    int insertSelective(TbOrder record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_order
     *
     * @mbggenerated Wed Jan 10 09:44:34 CST 2018
     */
    List<TbOrder> selectByExample(TbOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_order
     *
     * @mbggenerated Wed Jan 10 09:44:34 CST 2018
     */
    TbOrder selectByPrimaryKey(String orderId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_order
     *
     * @mbggenerated Wed Jan 10 09:44:34 CST 2018
     */
    int updateByExampleSelective(@Param("record") TbOrder record, @Param("example") TbOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_order
     *
     * @mbggenerated Wed Jan 10 09:44:34 CST 2018
     */
    int updateByExample(@Param("record") TbOrder record, @Param("example") TbOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_order
     *
     * @mbggenerated Wed Jan 10 09:44:34 CST 2018
     */
    int updateByPrimaryKeySelective(TbOrder record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_order
     *
     * @mbggenerated Wed Jan 10 09:44:34 CST 2018
     */
    int updateByPrimaryKey(TbOrder record);
}